package IC.Lexer;
import java.lang.String;

public class LexicalError extends Exception
{

	private static final long serialVersionUID = 1L;

	public LexicalError(String msg)  {
    	super(msg);
    }
	
    /** The format string of an error message.
    */
    public static final String errorMessage = "%d: Lexical error: %s";
    public static final String errorMessageCol = "%d:%d Lexical error: %s";

    /** Returns an error message using <code>errorMessage</code> as a format
    * string and <code>line</code> and <code>message</code> as the line number
    * and detailed error message, respectively.
    */
    public static String formatErrorMessage(int line, String message) {
        return String.format(errorMessage, line, message);
    }
    
    public static String formatErrorMessage(int line, int column, String message) {
        return String.format(errorMessageCol, line, column, message);
    }

}
